Hi, I am trying to create a choice box with the list of all object IDs. I am getting an excepton Acces Violation. It would be great if anyone could point me to the error. The code:
Object Obj_object
DB reqBox = create "Edit Requirement" void accept(DB reqBox)
{
doorsuse - Wed Apr 24 08:08:21 EDT 2013 |
Re: Exception Access Violation You need one more parameter on the choice, "initial selection"
-Louie
|
Re: Exception Access Violation If you figure a variable large number of rows (in this case, one for each object) a "list" would be better. "choice" is for a small fixed number of choices. Your callback "accept" needs to check for selection of "-1" which means "nothing selected". The array of "choices" needs to be available when "realize" and "show" is executed; which almost always means it is a global array (like you have it). |
Re: Exception Access Violation llandale - Wed Apr 24 10:33:17 EDT 2013 If you figure a variable large number of rows (in this case, one for each object) a "list" would be better. "choice" is for a small fixed number of choices. Your callback "accept" needs to check for selection of "-1" which means "nothing selected". The array of "choices" needs to be available when "realize" and "show" is executed; which almost always means it is a global array (like you have it). Hi,
Thanks a lot for your response. I shall immediately give your suggestion a try and let you know. I have one more question. I want to know if the following is possible with DXL: I have created a choice ("choice1") with a few options for the user to select. I want to create another choice ("choice2" )depending on the option the user selects in "choice1" |
Re: Exception Access Violation doorsuse - Wed Apr 24 11:31:54 EDT 2013 Hi,
Thanks a lot for your response. I shall immediately give your suggestion a try and let you know. I have one more question. I want to know if the following is possible with DXL: I have created a choice ("choice1") with a few options for the user to select. I want to create another choice ("choice2" )depending on the option the user selects in "choice1" Nit-Pick: In the "Requirements Management", "shall" means you are obligated to do the action. In your case you are just saying what you will do and should use "will". lol Its rather complicated. To use "choice" DBEs you'll need to
-Louie |
Re: Exception Access Violation doorsuse - Wed Apr 24 11:31:54 EDT 2013 Hi,
Thanks a lot for your response. I shall immediately give your suggestion a try and let you know. I have one more question. I want to know if the following is possible with DXL: I have created a choice ("choice1") with a few options for the user to select. I want to create another choice ("choice2" )depending on the option the user selects in "choice1" You could also define the various dbeChoice2_x next to each other and modify the clbkChoice1() to "inactive" all of them, then "active" the one you want. Inactive DBEs will be grey'd out. |
Re: Exception Access Violation doorsuse - Wed Apr 24 11:31:54 EDT 2013 Hi,
Thanks a lot for your response. I shall immediately give your suggestion a try and let you know. I have one more question. I want to know if the following is possible with DXL: I have created a choice ("choice1") with a few options for the user to select. I want to create another choice ("choice2" )depending on the option the user selects in "choice1" Hi, in the past I always managed this sort of things like in the following example:
I simply create choice1 (fixed options) and choice2 (empty, dynamic options). Choice1 has a callback function that clears all entries in choice2 and inserts the new options.
@Louie: Are there any Problems with my solution or advantages of using two stacked choice DBEs? Or is it just personal taste? Regards, Johnny |
Re: Exception Access Violation Johnny_P - Thu Apr 25 03:16:38 EDT 2013 Hi, in the past I always managed this sort of things like in the following example:
I simply create choice1 (fixed options) and choice2 (empty, dynamic options). Choice1 has a callback function that clears all entries in choice2 and inserts the new options.
@Louie: Are there any Problems with my solution or advantages of using two stacked choice DBEs? Or is it just personal taste? Regards, Johnny I have done it almost the same way as Johnny has presented here. I found it easy and clean. It would be helpful it Louie could point out the pros and cons of this method or as Johnny mentioned if it is just a personal taste.
Btw thanks for the code Johnny, as i could take a few tips from your code. |
Re: Exception Access Violation Johnny_P - Thu Apr 25 03:16:38 EDT 2013 Hi, in the past I always managed this sort of things like in the following example:
I simply create choice1 (fixed options) and choice2 (empty, dynamic options). Choice1 has a callback function that clears all entries in choice2 and inserts the new options.
@Louie: Are there any Problems with my solution or advantages of using two stacked choice DBEs? Or is it just personal taste? Regards, Johnny Actually I hadn't considered the erase-re-create method. The table-driven approach in your method can be matched by mine by putting the various Choice2 DBEs in an array{}. It seems 6 of one and half a dozen of the other. However, conceptually my method has the advantage if the various Choice2 lists are fundamentally different things and your method better if they are fundamentally the same thing, just different instances. Things a "Dog" may do are different in nature than those of a "Spouse"; but the list of ladies for "Jim" to date may be different than for "Jack", but its still the same kind of list. From a set-theory perspective, the particular list for Jim and for Jack all come from the same super-set of "Ladies", but the particular list for the Dog and the Spouse don't share a meaningful common super-set; a Dog does not "Drive" and a Spouse does not "Fetch". -Louie OK, so my spouse's spouse "Fetches" but lets not get into that. |